import request from '@/utils/request'

// 查询年度人事归档列表
export const getEmployeeList = ({ page, size }) => {
  return request.get('/sys/user', { params: { page, size }})
}

// 添加员工
export const addEmployeeUser = data => {
  return request.post('/sys/user', data)
}

// 删除员工
export const delEmployeeUser = id => {
  return request.delete(`/sys/user/${id}`)
}

// 批量导入员工
export const addAllUser = data => {
  return request.post('/sys/user/batch', data)
}

/**
 * @description: 保存员工信息
 * @param {*} data
 * @return {*}
 */
export function saveUserDetailById(data) {
  return request({
    url: `/sys/user/${data.id}`,
    method: 'put', // 全量修改
    data
  })
}
